fixed the legend