error handling adjustments