Fix crash if saving raster with low resolution