Fix for ssl_error handler