changed logic of component handling