fixes issue #2891