upgrade scripts fix