Fixed logic in EnsembleSimilarity