Fix event listener bug, allow newer versions of jquery.