Fix writing corrupt REG_SZ to the registry.