improved anti-rot handling