fix lossless compression