Fix for Xenforo 1.2, thanks to Luke Foreman