Fix js bug and https warnings.