fix a problem related to #6502, but the issue itself is not fixed yet