More robust repository querying