Fixes for daemon