clean a rom header by blanking out bytes 7 - 15
If it's blanking out the entirety of byte 7, that's your problem.
The high bits of byte 7 are the high bits of the mapper number.
(mapper 64 = 40 in hex, so this program would be wiping out the 4 in 40, causing it to be changed to 0)
Use a hex editor to change that byte back to 40)
The smarter cleaning is to problem check for certain header corruption patterns as most corruption is one of a few specific strings (like "DiskDude!")
(I'd say detect iNES 2.0, but I haven't yet seen it actually used)