NDProofs fixes undo bugs