Fixing spectrum matching with multiple elements.