More robust https enabling/disabling