Fix SSL check