Fixing bug with levenstein distance