fixed bug in damerau distance