Fix IE8 exception and legend.