Fix bug for SSL support