Fixed a bug in the scoring