Fix for #4589.
Merge pull request #4591 from Segrain/master

Smallfix.