Resubmit to 2.3
Merge pull request #2891 from ghost1227/issue/2707

Resubmit to 2.3