fixing legend