use xid for daemon too