Fix DBScoreTable, and add a test