Fixed kernel crash when unplugging device