fix a bug when delete dom