fix #4682
Merge pull request #5043 from cvrebert/patch-1

fix #4682