Fix device error handling again