fix util.invRanks must be exported