fixed BadValueError
* encoding problem