Fixing the stream array overwrite issue

The iteration index for the array of ints was counting the number of
bytes, not the number of ints. This made it walk off the end of the
array by 4 times the size.