fixing daemon bug, small bugs from testing