Bug fix in word splitting for ngrams