small fix in upgrade part