fixed bug in handling of uint8_t values