Fix #10701 & 10838