Fix bug for when less than 1 raster is provided.