add missing check for AI spawning