fix updateBy method to correctly populate user references