Fix component add/change and delete dialogs

The error handler gets called on clicking the 'Cancel' button... will add a test for that