Fix https env detection when flase