Fixed a bug for utf-8