fix invalid-typed-array-length error