bug fixes and set two ranking system