Fix event emission on delete (thanks to @MatthieuDartiailh for the report)