Update $ref references