Fix bug in similarity analyzer.