fix https support