Fix issue #3039