strange fix for legend