fixes #5267 in master branch
Merge pull request #5603 from dotCMS/merge-5267-to-master

fixes #5267 in master branch