Fixed bugs in iRating calculation.