d3 references fixed