Script fix by attach d3 to global.