Fixed a bug in Sim AI