Fixed sorting bug where all words were not added to list of words to be sorted