bug with first word in wordIndex ignored fixed