some fixes to check for tmux - incomplete