Fixing bug #3783

http://tracker.modx.com/issues/3783