Fix ref after moving class