Bugfixes from ingest testing