Fix #11400 and #11431