fix testfunc for HistogramPdf. Address comments from Piti on the pull request.