fix for #13747

Closes #13782 by merging it.
Merge branch 'erwanjegouzo-master'