Fix typo.
Make sure that ScoringFunction object is refcounted.