Bugs fix + https support