Fixed bucketing to have unique bucket for 0 distance.