Another tweak for bug #7906.  The toArray function now correctly returns the id and DeviceID.