Fixed NPE in HTTPS