fix the http bugs