fixed undo-tree, auto-complete and div modes