bug fix with ssl connection creation