Fixed ranking algorithm and initialization issues
Fixed ranking algorithm and initialization issues