fix #12557 fix #21879