fix for https

Hi Mika,
Since it didn't work with SSL I fixed it.