fix 1D ring of distances