Fix for #3683.
Merge pull request #3684 from Segrain/master

Bugfix.