Fix boolean operator precedence error