Fixed bug in TcpSocket that causes library to crash.