corrected mistake in compare_tiff function