Fixes #3542
Merge pull request #3567 from Atry/patch-3

Fixes #3542