fix no func clause bug in daemon