fixin wordcount bug
a better fix for word count bug