merge_batches fix