Fix ssl bug: mode not set.