bug fix

http://modx.im/blog/fast-solution/671.html