fixes #2001
Merge pull request #2081 from dotCMS/issue-2001-photo-gallery-macro-not-working-221

fixes #2001