Tweak for upgrade process on self::$upgrade_needed