Fixed error with placement of d3 script