lang: HID: fix procedure when devices get closed
class library: HID:  fix procedure when devices get closed