fix bug with min score