more partial fixes to the provider err handling problem