fix resourceObject unlink
hopefully this brings us into 64-bit compatibility