operator precedence wasn't handled right in some cases