Fix issue #1857
Merge pull request #1858 from rarila/issue-1857

Fix issue #1857