Fix writing the package back to the host