fix for daemon