Fixes incorrect errors reporting on devices unregistration.