Fixed typos in score function.