using HttpsUrlConnection was a bad idea.
bug fix