state update
should clean up after itself.
#2963
Merged
state update
should clean up after itself.
#2963