Fixed some errors in parenthesis matching.