fixed some bugs with ingest