* patched up main loop, getting rid of spurious $batch->next call warnings