Fix: handling metadata during deletion