Less buggy improved telnet code processing