ByteBuffer freeing fix, javadocs update