Fixed a bug: the bug will replace the character ')' wrongly

Fixed a bug: the bug will replace the character ')' wrongly