Fix distance for on-line checking