fix ssl certs handling
fix autodiscover