Change indexes of write and read bytes