fix for ssh and old termcaps