Replace deprecated getRefs() calls