Fix issues with output parentheses