fix nested predicates