UndoManager: bug fix for empty user actions