fixes for the autodiscover