AI.stat && !AI.client should be an || so the AI is ignored if it's dead OR clientless, not dead AND clientless.