fixed bug in ssl init