fix dom manipulation