add_device array fix