Fixed small bug that occured when running job on several input directories.