Setup undo to work with new exceptions handling