Fixed a bug in the batch script