Fixed problem with http/https init