Fixed indexing in Raw IO wrapper.