improve https support