improved cc error handling