Fix switching to HTTPS

Change-Id: I9d151dda0979ea7b69231e6868cf6ad42da55a3c
Merge "Fix switching to HTTPS"