fixed bug of telnet session hanging due to missing .write() in _run()