Adjusting order of undo steps.