more cleanup in daemon