fixed error when retrieving objects from collect by index, now retrieving by model id