Fix for #4297.
Merge pull request #4379 from Segrain/master

Smallfix.