batchname bug that causes race condition