clean-up legends