Fix upgrading