Fixed a couple of problems in D3 definition