Fixed an issue with HTTPS and valid Certs