Replace unsigned char with uint8_t