Woops, don't override ref if it's coming from the query itself