fixed attach-daemon