Unbalanced parenthesis bug fix