model_discovery bug fixed