Fixed HTTPS bug