Fixing bug #3698

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