fix parentheses in sum/product macros, close #213