fix bug: bad device id when add device send to the server