Fix upgrading packages processing.