Fix for #8344
Merge pull request #8518 from awasilyev/devel

Fix for #8344