UPGMA bug fix