fix the legend order