Fixing bug #3746

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