fixed ssl bug