fix telnet input decoding