Fix + Backwards compatibility with ruby 1.8 (problem with https)