avoid losing the state