update function gameobjects bugfix