fix #2434 remove side effect of #1638
Merge pull request #2436 from liukun/gh-2434

fix #2434 remove side effect of #1638 for 3.8.x