Changes as per http://community.mybb.com/thread-143314.html

Changes suggested at http://community.mybb.com/thread-143314.html