right places and fix a rank bug