fix refresh legend