fixed issue with theme switcher regarding legend/metadata window