fixed memory leak by freeing Chunk::data in destructor