Fixed indexing error in edge similarity matrix.