wrong operator precedence fixed