Fix daemonization