Fix daemonizing support