Added some lines to prevent a word from showing up twice in a row.