Backport #1792 to 2.3
Merge pull request #1822 from yakky/feature/pr_1792_23

Backport #1792 to 2.3