fixing legend placement