fix possible utf8 bug