fix for d3.mouse crashing