Fix logic in the upgrade view