[bug] Fix the unit tests, close #3550