Fixed deletion procedure.