Fixing bug #3847

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