Fixed the problem of not converging for MeanShift