fix issues with utf-8 encoding errors