Fixed a nasty typo when calculating word length.