Fix a bug when adding a batch when one already exists