fixes #5630 in master 3.0
Merge pull request #5646 from dotCMS/merge-5630-into-master-3-0

fixes #5630 in master 3.0