ranking order bug fix