improved communication error handling