fix tls issue