Fix wrong terminal in tmux in some cases.