Fix debug assert on delete