Fixing bug #3746

http://tracker.modx.com/issues/3746
Merge pull request #12 from Jako/patch-10

Fixing bug #3746