Fix another bug in discovery.