Fixed ByteBuffer bug