Fix bug with d3 not rendering properly