Fix loop over the number of resolutions