fix the legend size issue