Fix error with parsing words in a string