Fixed undo, added activeTabIndex option