Add orig_coi to the reponse, fix bugs with coi-to-apc conversion.