Fixed Chebyshev to take distance into account