fixed bug in addLegend