Fixed crash in Spawn::checkSpawn.