fixed memory leak with compressed data