Fixed infinite loop bug (prevents spawns).