Fixed bug in StringDistanceCalculator