Bug fixes with upgrade to jQuery 10.x