fixed autodiscovery process