Fix #19100 and fix a typo Upstream-commit: 349d9700bd5e3bbf86ea2b7c0097b5f897e2fbc1 Component: engine