Minor changes to the ranking algorithm