Fixed definition of distance ratio