fix a crash when playing with AI players