Corrected undo order