fix operator precedence bug