Merge pull request #1720 from madeso/master

Fixes issue #1718