Fix bugs in dpd scoring