Fixed hard coded http protocol which is ignored for https