Fixed normalization of the similarity matrix.