fix ngram cleanup