Fix some cases where parentheses were printed incorrectly.

Fixes #82.