Fixes #1874
Merge pull request #1875 from Giacom/issue_1874

Fixes #1874