minor cleanup of tcp_client