fixing bug if link_objects called first