fixed the segfault in example by fixing expr_ternary