fix ArraySizeTooSmall bug