undo/redo working with minor issues