Crash fix: Device deregister on disconnect