cleaning after undo / redo