Some tcp_connection fixes