Fixes daemon mode

Fixes #59