Undo button seems to work as desired