fixed bug with https