Fix enable/disable AI.