Fix daemon compiling issue