fixes to multi thread daemon