Start / end transaction replace element after runing code

See this post as well - this is really the crux of the issue. Close and open does not always work for handling this problem either.