Fixing ssl issue with value swapped on keys