fixing legend and metadata refresh/resize issues - thanks Lars!