Fixing bug #7541

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

Fixing bug #7541