making undo consistent