fix wrong type convertion: negtive int -> unsigned char.