fixing legends