Added code to remove settings for unexisting widgets.