Issue #20866: Bug fixes