More predicate and attribute related fixes