Fix bad ternary syntax