small fixes, first work on an upgrade ranking