Fix mismatched parentheses bug