Fixed compile error and made AI settings more robust to game settings.