remove unmatched }