important fix dom remove bug