Fix issue #2982