Fix pmd loading method and test code.