Fixed a hanging problem in the computer AI