Add preconditions.
Fix issue related to SSL sockets.