fixed some bugs in PlayerAI