Fix an oops with the poor error handling.