Fix issue #251 - Take into account the position of the ByteBuffers