fix missing state saving