Fixed empty parentheses cases, although one case has a sub-optimal error message, which is noted in the source code