fix caching of predicates