fixed last element cast in linkObjects