Anagram miscalculating