Some bug fix for mass complete and delete