fix parenthesis mismatches