fix tiff LZW performance issue