predicate performance improved and bug fixed