Fixes state/clearState.