cleanup the device field
Updated for ubigate1.4