Fixing bug #3847

http://tracker.modx.com/issues/3847
Merge pull request #9 from Jako/patch-5

Fixing bug #3847