fix bug in compute score
#538