fix bug in words with multiple same letters