fixes issue #2882