fixes issue 1780