Improved hadling of insert batches.