fix unbalanced paren in regex