bug fix: Levenshtein loss calculation