Fixed a bug in callback function of replace

Forgot the original string parameter in the callback function for replace, which led to the bug that the original string is being considered kanji and kanji are treated as kana.