Fix busted JS in newer versions of EE