added window resize logic for standalone telnet