Fix references in objects and methods