HTTP client bugfixes