Fix daemon and gevent problem