Fix math on plotRank