fixes issue #1783