Fix HTTPS handler