Fixing TERM correction logic for tmux