Fixed spawning problem