fix: add upgrade step to convert bad reference in terms