fixed "fixed last element cast in linkObjects"