clean up functions and stop upgrades when selecting done upgrading