Changed data type fro char to unsigned char.