Fix handling errors.