Fixed bug in ingest cancellation code