Patch from Wincent Balin: Remove some duplicate code from the PDa plugin