Fixed undo/redo in new tabs