Fixed error on score_rate function