undo support for discard