Fixed missing check on delete.