Fixed broken undo after chain of backspace actions.

When you press 'backspace' few times and then try roll back action the result isn't expected.
But it's a dirty fix. I suggest to use state for UndoManager.