Fix a few upgrade bugs, one of which was caused by #729

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>