Fixing http client bug