fixing issue 8931

this fix issue #8931.