fix http://modx.im/blog/1305.html#comment12980