Fix bugs of ngram spell checker.