Fix some issues with operator precedences