Fix #29699 --------- Co-authored-by: silverwind <me@silverwind.io> (cherry picked from commit 2da13675c0cfdc531044553636c3b74f2fda3eb4)