fix the legend