fixed a bug in the reprocess script