Fixed the spawning problem