Moved result var in ingest method into correct context.