Fix lookup field for refs