Fixing large IOBuffer handling; missed index calculation as uint16_t.