Fix for chebyshev distances other than 1, fixes issue #8