Fixed spawning bug