fixed strange legend width bug