Adjust numbers of ranks