Fix issue-1786

Fixes issue #1786