Undo/Redo buttons are working properly