fix uint8_t scanf bug in decoding