fixed a crashbug during tiff check