bug fix of daemon.
Merge pull request #19 from luoruici/master

Fix bug of daemon