fix ranking generation script