Fix problem with deleting components.