Corrected Bug for case: repeated letters in word