Fixes for TcpClient.close()