fix concurrent bug for http client