ByteBuffer related bug fix.