Fixed a bug in mean-shift