fix bug in zorders of freshly spawned objects