Fixes to HTTP stuff