fixed spawning issue