improve ssl check