Correcting a bug where upgrade didn't works