Fixed error in regular clustering