fix a bug in scoring