fixed bug with utf-8 characters