You misunderstood the mechanics of the game. You think it's giving you the number of matching letters in total, but it's actually giving you the number of matching letters in the correct positions in the word. So, there is no bug there)