Made some changes to the widget code so that the widget settings are saved when upgrading