Removing tif and correcting a bug