Fixing undo feature
Fixing undo feature