Fix bug: take indices of distant points

Set the weights of points that are NOT among k-nearest neighbors to zero.