avoid problems on delete