Fixes bug with HTTPS requests.