Fixed one bug with device id.