Fix up error handling.