Added cleaning of ByteBuffer