minor improvements for daemon