fixed typo in Ranking function