Debug cleanup on UndoManager.