Fix distance metrics for shorter permutations!!
Update