Fixed one AI loop.