Fixed a bug with score calculation.

Change-Id: If3e5c1ea3739f05630e998b74b191a980e46c1d4