fix ranking for nil