fix predicate query template