Fixing bug #7541

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