Fixed error in the deletion of the widgets for the settings dialog.