Fixed the bugs which repeat character.

Signed-off-by: servanter <fengshang@126.com>