Fix for issue #42 - missing parentheses in some expressions