Fix for latest version of jQuery