fix legend draw