fix signed/unsigned char mess