fix connection reset by remote host