fix the bug of ranking

#242