fix bug in utf8 paste check