Fix regressions
Merge pull request #2738 from ke-yu/fix_regressions

Fix regressions