Fixed infinite spawn loops