Fixed a bug in the batch loader.