fixed duplicate dom bug