Fix issue #6502