fix for multiple-objects scene

I was creating the object index when the scene didnt have the info of all the objects yet