Removal of residues in the die