Fixed a division-by-zero bug in calculating score.