Fixed a bug

In line 211 instead of value, index was used to calculate the distance
of the depo from the first store