Bug fixes for bad repository queries.