Fixed a mistake with the ratings calculator algorithm