fix bug when computing log likelihood of DP