Fix component add/change and delete dialogs

Do we have a test for this?