fixed an encoding error with utf-8 strings