Fixed an error where Uint8array would be empty