fix bug in scoring