fixes the multiple delete issue