Bug fixes - HTWorker.cpp:process_batch