Fixed bug with HTTPS connections