tried to fix an issue with spawning of entities