Fixed bug leading to one batch being created only