fix ranking bug