fix for collectObjectsNum