add some testcases.
bug fix