fix introduced bug in hcluster algorithm