Partial fix #7708
Merge pull request #760 from ddanielvaz/partial-fix-7708

Partial fix for #7708