Fixed the TCP client problem. All tests pass now.