issue #19847: two bugfixes