fix ssl support bugs