Fixed a big, stupid bug in the AI.