Fixed bugs in PDPatcher.