added explicit ssl check