Fixes to the HTTP layer