Fix for #3770.
Merge pull request #3772 from Segrain/dev

Dev bugfix.