Fix autodiscover on 1.7