Fixed the print error when no word repeated.