Fix bulk delete code

Also going to add automated user acceptance test.