Fix readded error due to UnitAI modification for capturing.