Fixes to SSLSocket