Mi fix: conserve original error handling behaviour

Make sure success is put to zero when an error happens