spawning bug fix