fix lost state