Fix issue of N-Gram's test cases