Fix regressions in test cases
Merge pull request #2728 from Randy-Ma/fix_regressions

Fix regressions in test cases