fix upgrades and add some shell util