fix bug with utf-8 chars