Fixed bug where deleted batches wouldn't get marked as deleted