Fix SSL connect bug #1938