Fix rtiostream buffers indexing

Ah, that's why it segfaulted!