Changed load_batch to automatically purge batch on exception; fixes issue #23.