More fixes to AI