Added some parens to a ternary for readability