fix bug with negative score