Correct bug on delete events