Fix custom predicates functions