Fixing a bug with edge and node stylers (now assumes that element is a d3 selection)