Fix for issue-1759
Merge pull request #1770 from ifung/issue-1759

Fixes #1759