Ingest script fixes