Fix sloppy ternary operator