Fixed bug with headWords.