miscellaneous fixes to the daemon.