Fix if predicate handling