Improve term-mode