Fixing ssl connection issues