fix a bug of resetAI