Corrected some upgrade errors