fixed deviceId corruption bug