cleaned up the check for valid spawn