Minor fixes
Tests for daemon