Fix error with repo discovery