Fix bug with average in compute_score