cleanup legend box