Bug fix to compress the data