Co-authored-by: Bogdan <mynameisbogdan@users.noreply.github.com> (cherry picked from commit 1374240321f08d1400faf95e84217e4b7a2d116b) Closes #5301