tmux and script fixes