fix #25 solve problem of recreating gate states if new node attached