Cleanup, possibly unbreak daemon mode.