Merge pull request #4670 from fritsch/pacork