fixed daemonize bug