Ensure that daemon deinitializes properly