bugfix: when destroying an item unregister all its subcomponents