fix bug for upgrade finish