fixes issue #2842