fix LZW compression