Fixed fullupgrade function