Fix query of revisions.