fix reappend tag if detached from dom