issue #22237: printing bugfixes