Fix bug in filtering unique n-grams.