Fixed the spawning issue with NPCs