fix bug: dendrogram crashes when number of leaves is 1