Fixes issue #1770