Bug fixing for SSL