Fix for #18136
Merge pull request #18224 from cvedel/issue-18136

Fix for #18136