Adds test and fix for issue #82
Merge pull request #83 from mamacdon/new-parens-func-fix

Adds test and fixes #82