Small fixes when working out the ngram length