hierarchical_clustering fix