more cleanup for AutoBatch