Change to core JS to fix modal issues