fixed bug on TypedArrays