fix to http->https redirection code