Merge pull request #50 from ferd/fix-pheap