fix for legend