Changes to the way gadgets are installed in the upgrade script