corrected scope of consistency variable in batch inserter