fix leonardo support: received data may be longer than 1 byte