Better previous DOM removal handling.