fixes issue #2826