fixed data references in d3 code