Correctly update the ByteBuffers position on write and writev