Fixing bug #3783

http://tracker.modx.com/issues/3783
Merge pull request #21 from Jako/patch-19

Fixing bug #3783