Fix set_devices() to ensure resetting active devices info. before adding new device