Fixed memory leak in batch allocator; MNIST bench