error handling adjustment