Fix spawning bug.