fix close paren correction code