Improve cleanup after device disconnected event