fix divide by zero in delete_in_batches