fixed bug that improperly matched up parenthesis