fix Uint8Array input