Issue #19300 Fix a few bugs after testing.