fixing some bugs in DOM and use https links