merge daemon-related changes from havana