Fix some upgrade crashes