end version
I fix the error when encoding