Fixing repeating actions in AI.