Fix ranking bug
Fix division in ranking