fix #24742 and #24718