fixes #27877 --------- Co-authored-by: 6543 <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>