Fixed rankings to use new query API