Fix operator precedence issues