bug fix on Ranking