improve AbstractComponent::set method