fixed bug with spawns being invalid