fixing missing operators and operator precedences