Fix ptrhash encoding