undo-redo integration hack