Fixed daemonizing issues.