fix bug with nearest stones