In type 4, https was put in http and http was put in https. This commit corrects that.