Fixing bug #9813

http://tracker.modx.com/issues/9813
Merge pull request #45 from Jako/patch-1

Fixing bug #9813