fixed issues with inconsistent D3 rendering