Remove unnecessary delete statements.